import type { R, P } from '@/type/base'
import { request } from '@/utils/request'

import { GoodsInfo } from '@/type/merchant/goodsInfo'
export const getGoodsInfo = async (goodsId: string): R<GoodsInfo> => {
  return await request({
    path: '/buyer/goods/get/attr/list',
    method: 'GET',
    data: {
      goodsId,
    },
  })
}

export const byAttrGetSkuInfo = async (mark: string): R<GoodsInfo> => {
  return await request({
    path: '/buyer/goods/get/sku',
    method: 'GET',
    data: {
      mark,
    },
  })
}
